/**
 * 窗口上下伸缩
 * @param props
 * @constructor
 */
export const WinUDResize = (props: WindowInterface.WinResizeProps) => {
  const sign = props.isTop ? "top" : "bottom";
  return (
    <div class="win-cursor flex flex-row">
      <div
        data-key={`${sign}-left`}
        class={["win-cursor w-2.5 h-2.5 bg-transparent", props.isTop ? "cursor-nwse-resize" : "cursor-nesw-resize"]}
        onMousedown={props.mouseResizing}
      ></div>
      <div
        data-key={`${sign}-center`}
        class="win-cursor cursor-ns-resize h-2.5 grow bg-transparent"
        onMousedown={props.mouseResizing}
      ></div>
      <div
        data-key={`${sign}-right`}
        class={["win-cursor w-2.5 h-2.5 bg-transparent", props.isTop ? "cursor-nesw-resize" : "cursor-nwse-resize"]}
        onMousedown={props.mouseResizing}
      ></div>
    </div>
  );
};

/**
 * 窗口中部的左右伸缩
 * @param props
 * @constructor
 */
export const WinLFResize = (props: WindowInterface.WinResizeProps) => {
  const sign = props.isLeft ? "left" : "right";
  return (
    <div
      data-key={`center-${sign}`}
      class="win-cursor cursor-ew-resize w-2.5 h-full bg-transparent"
      onMousedown={props.mouseResizing}
    ></div>
  );
};
